package com.yihuan.service;

import com.yihuan.entity.RecycleProductEntity;
import com.yihuan.mapper.RecycleProductMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Author:梦醒
 * Date: 2022/4/21 9:13
 * Dream:
 * 信言不美，美言不信。
 * 善者不辩，辩者不善。
 * 知者不博，博者不知。
 * Function:
 */
@Service
public class RecycleProductService {
    @Resource
    RecycleProductMapper recycleProductMapper;
    
    /**
     * 分页查询数据
     *
     * @param recycleProductEntity
     * @return
     */
    public List<RecycleProductEntity> findRecycleProductByRecycleProductList(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.findRecycleProductByRecycleProductList(recycleProductEntity);
    }
    
    /**
     * 统计分页查询数据
     *
     * @return
     */
    public int countRecycleProductList(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.countRecycleProductList(recycleProductEntity);
    }
    
    /**
     * 模糊分页查询数据
     *
     * @param recycleProductEntity
     * @return
     */
    public List<RecycleProductEntity> findRecycleProductByRecycleProductConcatList(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.findRecycleProductByRecycleProductConcatList(recycleProductEntity);
    }
    
    /**
     * 模糊统计分页查询数据
     *
     * @param recycleProductEntity
     * @return
     */
    public int countRecycleProductConcatList(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.countRecycleProductConcatList(recycleProductEntity);
    }
    
    /**
     * 更改商品信息状态
     *
     * @param recycleProductEntity
     * @return
     */
    public int updateRecycleProductByRecProductState(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.updateRecycleProductByRecProductState(recycleProductEntity);
    }
    
    /**
     * 删除商品信息状态
     *
     * @param recycleProductEntity
     * @return
     */
    public int updateRecycleProductByRecProductDeleteState(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.updateRecycleProductByRecProductDeleteState(recycleProductEntity);
    }
    
    /**
     * 查询回收品信息名称 按商品编号
     *
     * @param recycleProductEntity
     * @return
     */
    public List<RecycleProductEntity> findRecycleProductByRecProductID(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.findRecycleProductByRecProductID(recycleProductEntity);
    }
    
    /**
     * 更改商品信息
     *
     * @param recycleProductEntity
     * @return
     */
    public int updateRecycleProductByRecProductData(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.updateRecycleProductByRecProductData(recycleProductEntity);
    }
    
    /**
     * 模糊统计分页查询数据
     *
     * @param recycleProductEntity
     * @return
     */
    public int insertRecycleProductByRecycleProductData(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.insertRecycleProductByRecycleProductData(recycleProductEntity);
    }
    
    /**
     * 前端分页查询数据
     *
     * @param recycleProductEntity
     * @return
     */
    public List<RecycleProductEntity> findWebRecycleProductByRecycleProductList(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.findWebRecycleProductByRecycleProductList(recycleProductEntity);
    }
    
    /**
     * 前端统计分页查询数据
     *
     * @return
     */
    public int countWebRecycleProductList() {
        return recycleProductMapper.countWebRecycleProductList();
    }
    
    /**
     * web商品详情页面
     *
     * @param recycleProductEntity
     * @return
     */
    public List<RecycleProductEntity> findWebRecycleProductByRecProductID(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.findWebRecycleProductByRecProductID(recycleProductEntity);
    }
    
    /**
     * 前端分页查询数据按类型查询
     *
     * @param recycleProductEntity
     * @return
     */
    public List<RecycleProductEntity> findWebRecycleProductByRecycleProductListByRecStyle(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.findWebRecycleProductByRecycleProductListByRecStyle(recycleProductEntity);
    }
    
    /**
     * 前端分页查询数据 按商品类型数据
     *
     * @param recycleProductEntity
     * @return
     */
    public List<RecycleProductEntity> findWebRecycleProductByRecycleProductListAndRecStyle(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.findWebRecycleProductByRecycleProductListAndRecStyle(recycleProductEntity);
    }
    
    /**
     * 前端统计分页查询数据 按商品类型数据
     *
     * @param recycleProductEntity
     * @return
     */
    public int countWebRecycleProductListAndRecStyle(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.countWebRecycleProductListAndRecStyle(recycleProductEntity);
    }
    
    /**
     * 前端分页查询数据 按公司地址数据
     *
     * @param recycleProductEntity
     * @return
     */
    public List<RecycleProductEntity> findWebRecycleProductByRecycleProductListAndCompanyAddress(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.findWebRecycleProductByRecycleProductListAndCompanyAddress(recycleProductEntity);
    }
    
    /**
     * 前端统计分页查询数据 按公司地址数据
     *
     * @param recycleProductEntity
     * @return
     */
    public int countWebRecycleProductListAndCompanyAddress(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.countWebRecycleProductListAndCompanyAddress(recycleProductEntity);
    }
    
    /**
     * 按月份统计数据
     *
     * @param
     * @return
     */
    public List<RecycleProductEntity> findWebRecycleProductByRecycleProductCount() {
        return recycleProductMapper.findWebRecycleProductByRecycleProductCount();
    }
    
    /**
     * 前端分页查询数据 按月份数据
     *
     * @param recycleProductEntity
     * @return
     */
    public List<RecycleProductEntity> findWebRecycleProductByRecycleProductListAndMonth(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.findWebRecycleProductByRecycleProductListAndMonth(recycleProductEntity);
    }
    
    /**
     * 前端统计分页查询数据 按月份数据
     *
     * @param recycleProductEntity
     * @return
     */
    public int countWebRecycleProductListAndMonth(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.countWebRecycleProductListAndMonth(recycleProductEntity);
    }
    
    /**
     * 前端分页查询数据 按公司名称数据
     *
     * @param recycleProductEntity
     * @return
     */
    public List<RecycleProductEntity> findWebRecycleProductByRecycleProductListAndCompanyName(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.findWebRecycleProductByRecycleProductListAndCompanyName(recycleProductEntity);
    }
    
    /**
     * 前端统计分页查询数据 按公司名称数据
     *
     * @param recycleProductEntity
     * @return
     */
    public int countWebRecycleProductListAndCompanyName(RecycleProductEntity recycleProductEntity) {
        return recycleProductMapper.countWebRecycleProductListAndCompanyName(recycleProductEntity);
    }
    
    /**
     * 统计废品数据
     *
     * @param
     * @return
     */
    public int countRecycle() {
        return recycleProductMapper.countRecycle();
    }
}
